//
//  NewNetWork.h
//  jiaxin
//
//  Created by longziyuan on 14-8-23.
//
//

#import <Foundation/Foundation.h>


#define api_url_prefix [[NSUserDefaults standardUserDefaults] objectForKey:@"api_url"]  //使用中转地址或者使用原地址


#define origin_url_prefix [[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"soft" ofType:@"plist"]] objectForKey:@"soft-public-interface-url"]  //原公共地址前缀


//#define origin_url_prefix1  @"http://uy990.10086tel.com:8008/api/user2.0"










#define MULTIAGENTSWITCH  [GlobalVar getMultiAgentStr]

#define MOBILE_MODEL   [GlobalVar platformString] //获取手机型号

#define SYSTEM_INFRO   [NSString stringWithFormat:@"%@,ios%.1f",MOBILE_MODEL,[[[UIDevice currentDevice] systemVersion] floatValue]] //获取手机信息
#define NETWORKSTATE   [GlobalVar getNetWorkStates] //判断状态栏网络状态

@protocol newNetWorkDelegate <NSObject>

-(void)getTheAnalysizeResults:(NSString*)result;

-(void)getFailResults:(NSString*)errorResult;

@end





@interface NewNetWork : NSObject<NSURLConnectionDataDelegate,NSURLConnectionDelegate>
{
    NSMutableData* resultData;
    

}

@property (nonatomic,assign) id<newNetWorkDelegate>delegate;
-(void)getNetUrl:(NSString*)prefixStr  CanShu:(NSString*)Can;

-(NSString *)Getmd5code:(NSString *)code;
@end
